<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>All Tasks</title>
</head>
<body>

<h2>All Tasks</h2>

<a href='<c:url value="task/add"/>'>Add</a>

<table>
    <tr>
        <th>Name</th>
        <th>Description</th>
        <th>Date</th>
        <th></th>
        <th></th>
    </tr>
    <c:forEach var="t" items="${tasks}">
        <tr>
            <td><c:out value="${t.name}"/></td>
            <td><c:out value="${t.description}"/></td>
            <td><c:out value="${t.date}"/></td>
            <td><a href='<c:url value="task/edit/${b.id}"/>'>Edit</a></td>
            <td><a href='<c:url value="task/delete/${b.id}"/>'>Delete</a></td>
        </tr>
    </c:forEach>
</table>

</body>
</html>